export interface IRouteConfig {
  path: string
  component?: string
  redirect?: string
  exact?: boolean
  name?: string // 兼容此写法
  icon?: string
  // 更多功能查看
  // https://beta-pro.ant.design/docs/advanced-menu
  // ---
  // 新页面打开
  target?: string
  // 不展示顶栏
  headerRender?: boolean
  // 不展示页脚
  footerRender?: boolean
  // 不展示菜单
  menuRender?: boolean
  // 不展示菜单顶栏
  menuHeaderRender?: boolean
  // 权限配置，需要与 plugin-access 插件配合使用
  access?: string
  // 隐藏子菜单
  hideChildrenInMenu?: boolean
  // 隐藏自己和子菜单
  hideInMenu?: boolean
  // 在面包屑中隐藏
  hideInBreadcrumb?: boolean
  // 子项往上提，仍旧展示,
  flatMenu?: boolean
  wrappers?: string[]
}

const routes: IRouteConfig[] = [
  { path: '/', exact: true, redirect: '/home' },
  { path: '/home', name: '系统首页', component: '@/pages/home/Index' },
  { path: '/login', component: '@/pages/login/Index', menuRender: false, headerRender: false, footerRender: false, },
  {
    path: '/banner',
    name: '轮播图管理',
    routes: [
      { path: '/banner/list', name: '轮播图列表', component: '@/pages/banner/index' },
      { path: '/banner/add', name: '添加轮播图', component: '@/pages/banner/add',
      wrappers: [
        '@/wrappers/auth'
      ]
      },
       
    ]
  },
  {
    path: '/pro',
    name: '产品管理',
    routes: [
      { path: '/pro/list', name: '产品列表', component: '@/pages/pro/index' },
      { path: '/pro/recommend', name: '推荐列表', component: '@/pages/pro/recommend' },
      { path: '/pro/search', name: '筛选列表', component: '@/pages/pro/search' },
      { path: '/pro/seckill', name: '秒杀列表', component: '@/pages/pro/seckill' },
    ]
  }
]

export default routes